package com.yeswater.multithread.chapter2.test2_2.test3;

/**
 * author : yeswater
 * date : 2023/10/20
 */

public class Thread2 extends Thread{
    private Task task;

    public Thread2(Task task) {
        this.task = task;
    }

    @Override
    public void run() {
        CommonUtils.beginTime2 = System.currentTimeMillis();
        task.doLongTimeTask();
        CommonUtils.endTime2 = System.currentTimeMillis();
    }
}
